/*
 * Run `lessc style.less > style.css -x`
 */

@import (less) "../../lib/codemirror/lib/codemirror.css";
@import (less) "../../lib/codemirror/addon/hint/show-hint.css";
@import "less/uikit/uikit.less";

@global-primary-background: #007fff;
//@global-primary-background: #1875f0;
//@global-primary-background: #A0CECB;
//@global-primary-background: #eb5424;
//@global-primary-background: #485b8a;
@global-link-color: @global-primary-background;

.uk-noselect {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.uk-disabled {
    pointer-events: none;
}

.uk-selected, tr.uk-selected > td {
    background: @global-selected-background;
}

.uk-container-vertical-center {
    margin-top: auto;
    margin-bottom: auto;
}

[data-uk-svg] {
    opacity: .2;
}

.uk-text-upper {
    text-transform: uppercase!important;
    letter-spacing: .1em!important;
}

.uk-animation-fast {
    -webkit-animation-duration: .35s;
    animation-duration: .35s;
}

.uk-container-breakout {
    position: relative;
    width: 100vw;
    left: ~"calc(-1 * (100vw - 100%) / 2)";
}

.uk-svg-adjust path,
.uk-svg-adjust rect,
.uk-svg-adjust circle:not([fill="none"]),
.uk-svg-adjust polygon,
.uk-svg-adjust line {
    fill: currentColor;
}

.uk-svg-adjust path[stroke],
.uk-svg-adjust rect[stroke],
.uk-svg-adjust circle[stroke],
.uk-svg-adjust polygon[stroke],
.uk-svg-adjust line[stroke] {
    stroke: currentColor;
}

.app-header {
    position: relative;
    background-color: @global-background;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    margin-bottom: 2.5rem;
    z-index: 10;
}

.app-header-topbar {

    //background-color: @global-primary-background;
    padding: 15px 0;
    box-sizing: border-box;
    min-height: 60px;

    a { text-decoration: none !important; }

    .uk-contrast * {
        color: @global-contrast-color;
    }
}

.app-logo {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-image: url(../media/logo.svg);
    background-repeat: no-repeat;
    background-size: contain;
    margin-right: 10px;
}

.app-panel-dropdown {
    margin-top: 25px;
    width: 600px;
    max-width: 85vw;
    border: none;
    box-shadow: none;
    background: rgba(249, 249, 249, 0);
    padding: 0;
}

.app-panel-dropdown:before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(249, 249, 249, .95);
    z-index: -1;
}

.app-header-topbar a {
    transition: color 200ms;
}

.app-panel-dropdown .uk-nav-side a:hover,
.app-panel-dropdown .uk-nav-side .uk-active a {
    background: none;
    color: @global-primary-background;
}

.app-modulesbar > li > a {
    padding: 0 4px;
    color: rgba(0,0,0,.3);
}

.app-modulesbar a.uk-active {
    color: @global-primary-background;
    position: relative;
}

.app-modulesbar > li > .uk-active:after {
    content: "";
    position: absolute;
    width: 100%;
    border-bottom: 3px @global-primary-background solid;
    bottom: -20px;
    left: 0;
}

.app-main {
    margin-top: @global-margin-large;
}

.app-footer {
    margin: (2 * @global-margin-large) 0;
}

cp-actionbar {
    position:fixed;
    display:block;
    left:0;
    right:0;
    bottom:0;
    padding: 15px 0;
    background:@global-background;
    z-index: 4;
}

cp-fieldcontainer {
    display: block;
}

@media (min-width:1220px) {

    cp-fieldcontainer {
        padding-left: 15px;
        border-left: 2px rgba(0,0,0,.1) solid;
        transition: border-color 200ms;
    }

    cp-fieldcontainer[active="true"] {
        border-color: @global-primary-background;
    }
}

.material-ripple {
    position: absolute;
    pointer-events: none;
    z-index: 100000;
}
.material-ink {
    position: absolute;
    background: rgba(0,0,0,.1);
    border-radius: 50%;
    transform: scale(0);
}
.material-ink.animate-ink {
    animation: matrial-ripple .6s linear
}
@keyframes matrial-ripple {
    to {
        transform: scale(2.5);
        opacity: 0
    }
}

.dashboard-header-panel {
    background: @global-contrast-color;
    margin-top: -35px;
    margin-bottom: -70px;
    padding-top: 20px;
    padding-bottom: 120px;
    z-index: 0;
}

.header-sub-panel {
    &:extend(.uk-container-breakout);
    background: @global-contrast-color;
    margin-top: -35px;
    margin-bottom: 35px;
    padding-top: 20px;
    padding-bottom: 20px;
    box-shadow: 0 0 2px 0 rgba(0,0,0,0.22);
}

.header-sub-panel-tab {
    margin-top: 20px;
    margin-bottom: -20px;
    border-bottom: 0;
}

.header-sub-panel-tab[divider="true"] {
    padding-top: 10px;
    border-top: 1px rgba(0,0,0,.1) solid;
}


// vendor styles

.mce-tinymce {
    box-shadow: none !important;
}

.mce-panel {
    border: none !important;
}

.mce-fullscreen { 
    z-index: 981 !important; 
}

.uk-htmleditor-content,
.uk-htmleditor-navbar {
    border: none;
}
.uk-htmleditor-navbar {
    position: relative;
    box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.jsoneditor {
    border: none !important;
}

div.jsoneditor-tree {
    background: @global-contrast-color !important;
}

.jsoneditor-menu {
    background-color: @global-contrast-color !important;
    border: none !important;
    box-shadow:0 1px 2px rgba(0, 0, 0, 0.2);
}

.jsoneditor-menu input {
    border: none !important;
    padding: 0 !important;
    height: auto !important;
}

div.jsoneditor-menu>button,
div.jsoneditor-menu>div.jsoneditor-modes>button {
    color: #000 !important;
}

.CodeMirror span.cm-comment { color: #a86; }
.CodeMirror span.cm-keyword { line-height: 1em; color: blue; }
.CodeMirror span.cm-string { color: #a22; }
.CodeMirror span.cm-builtin { line-height: 1em; color: #077; }
.CodeMirror span.cm-special { line-height: 1em; color: #0aa; }
.CodeMirror span.cm-variable { color: black; }
.CodeMirror span.cm-number, .CodeMirror span.cm-atom { color: #3a3; }
.CodeMirror span.cm-meta { color: #555; }
.CodeMirror span.cm-link { color: #3a3; }

.CodeMirror .CodeMirror-activeline-background { background: #e8f2ff; }
.CodeMirror .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }

.CodeMirror .CodeMirror-gutters {
    border: none;
    background-color: @global-contrast-color;
}

.CodeMirror-hints {
  z-index: 1010;
  margin: 0;

  box-shadow: 2px 3px 5px rgba(0,0,0,.2);
  border-radius: 3px;
  border: 1px solid silver;

  background: white;
  font-size: 90%;
  font-family: monospace;
  max-height: 20em;
  overflow-y: auto;
}

.CodeMirror-hint {
  margin: 0;
  padding: 0 4px;
  border-radius: 2px;
  white-space: pre;
  color: black;
  cursor: pointer;
}

li.CodeMirror-hint-active {
  background: #08f;
  color: white;
}

// spectrum color picker
.sp-container, .sp-replacer  {
    background: #fff !important;
    border-color: #eee !important;
}
